package com.ruoyi.procured.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 采购商品明细表
 *
 * @TableName tb_orders_product
 */
@TableName(value ="tb_orders_product")
@Data
public class ProcuredOrdersProduct implements Serializable {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品编号（从100001开始递增的编码）
     */
    @TableField(value = "pro_no")
    private String proNo;

    /**
     * 产品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 产品价格
     */
    @TableField(value = "product_price")
    private BigDecimal productPrice;

    /**
     * 采购数量
     */
    @TableField(value = "transferable_number")
    private Integer transferableNumber;

    /**
     * 未入库数量
     */
    @TableField(value = "not_stocked_number")
    private Integer notStockedNumber;

    /**
     * 金额（含税金额）
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 入库数量
     */
    @TableField(value = "storage_number")
    private Integer storageNumber;

    /**
     * 备注
     */
    @TableField(value = "product_remark")
    private String productRemark;

    /**
     * 关联采购订单表(tb_procured_orders)
     */
    @TableField(value = "orders_id")
    private Integer ordersId;

    /**
     * 删除状态 0存在1删除
     */
    @TableField(value = "delete_status")
    private String deleteStatus;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 关联(tb_procured_product)
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 是否选择状态
     */
    @TableField(value = "selected_status")
    private String selectedStatus;

    /**
     * 待到货量
     */
    @TableField(value = "waiting_stock")
    private Integer waitingStock;

    /**
     * 已通知量
     */
    @TableField(value = "notified_count")
    private Integer notifiedCount;

    /**
     * 未通知量
     */
    @TableField(value = "unnotified_quantity")
    private Integer unnotifiedQuantity;

    /**
     * 通知收货量
     */
    @TableField(value = "notification_quantity")
    private Integer notificationQuantity;

    /**
     * 是否选择产品明细状态
     */
    @TableField(value = "details_status")
    private String detailsStatus;

    /**
     * 已经申请金额
     */
    @TableField(value = "the_amount_requested_quash")
    private BigDecimal theAmountRequestedQuash;

    /**
     * 总成本
     */
    @TableField(value = "total_cost")
    private BigDecimal totalCost;

    /**
     * 供应商ID
     */
    @TableField(value = "vendor_id")
    private Integer vendorId;

    /**
     * 交付时间
     */
    @TableField(value = "delivery_time")
    private Date deliveryTime;

    /**
     * 运费
     */
    @TableField(value = "freight")
    private BigDecimal freight;

    /**
     * 运费是否由供应商支付，0表示是，1表示否
     */
    @TableField(value = "is_supplier_pays_freight")
    private Integer isSupplierPaysFreight;

    /**
     * 关联货币单位表(tb_monetary)
     */
    @TableField(value = "monetary_id")
    private Integer monetaryId;

    /**
     * 汇率
     */
    @TableField(value = "currency")
    private BigDecimal currency;

    /**
     * 税率
     */
    @TableField(value = "rate")
    private String rate;

    /**
     * 税额
     */
    @TableField(value = "tax")
    private BigDecimal tax;

    /**
     * 含税金额
     */
    @TableField(value = "tax_included")
    private BigDecimal taxIncluded;

    /**
     * 1688订单号
     */
    @TableField(value = "order_no_1688")
    private String orderNo1688;

    /**
     * Walmart产品链接GTIN
     */
    @TableField(value = "gtin")
    private String gtin;

    /**
     * 样式
     */
    @TableField(value = "style_class")
    private String styleClass;

    /**
     * 待退货数量
     */
    @TableField(value = "return_pending_quantity")
    private Integer returnPendingQuantity;

    /**
     * 待退货数量
     */
    @TableField(value = "pending_exchange_quantity")
    private Integer pendingExchangeQuantity;

    /**
     * 是否全部退货或者退款完毕（0：否, 1：是)
     */
    @TableField(value = "return_completed_status")
    private Integer returnCompletedStatus;

    /**
     * 操作日志
     */
    @TableField(value = "operation_log")
    private String operationLog;
    /**
     * 序列化ID
     */
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProcuredOrdersProduct other = (ProcuredOrdersProduct) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getProNo() == null ? other.getProNo() == null : this.getProNo().equals(other.getProNo()))
                && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
                && (this.getProductPrice() == null ? other.getProductPrice() == null : this.getProductPrice().equals(other.getProductPrice()))
                && (this.getTransferableNumber() == null ? other.getTransferableNumber() == null : this.getTransferableNumber().equals(other.getTransferableNumber()))
                && (this.getNotStockedNumber() == null ? other.getNotStockedNumber() == null : this.getNotStockedNumber().equals(other.getNotStockedNumber()))
                && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
                && (this.getStorageNumber() == null ? other.getStorageNumber() == null : this.getStorageNumber().equals(other.getStorageNumber()))
                && (this.getProductRemark() == null ? other.getProductRemark() == null : this.getProductRemark().equals(other.getProductRemark()))
                && (this.getOrdersId() == null ? other.getOrdersId() == null : this.getOrdersId().equals(other.getOrdersId()))
                && (this.getDeleteStatus() == null ? other.getDeleteStatus() == null : this.getDeleteStatus().equals(other.getDeleteStatus()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
                && (this.getSelectedStatus() == null ? other.getSelectedStatus() == null : this.getSelectedStatus().equals(other.getSelectedStatus()))
                && (this.getWaitingStock() == null ? other.getWaitingStock() == null : this.getWaitingStock().equals(other.getWaitingStock()))
                && (this.getNotifiedCount() == null ? other.getNotifiedCount() == null : this.getNotifiedCount().equals(other.getNotifiedCount()))
                && (this.getUnnotifiedQuantity() == null ? other.getUnnotifiedQuantity() == null : this.getUnnotifiedQuantity().equals(other.getUnnotifiedQuantity()))
                && (this.getNotificationQuantity() == null ? other.getNotificationQuantity() == null : this.getNotificationQuantity().equals(other.getNotificationQuantity()))
                && (this.getDetailsStatus() == null ? other.getDetailsStatus() == null : this.getDetailsStatus().equals(other.getDetailsStatus()))
                && (this.getTheAmountRequestedQuash() == null ? other.getTheAmountRequestedQuash() == null : this.getTheAmountRequestedQuash().equals(other.getTheAmountRequestedQuash()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProNo() == null) ? 0 : getProNo().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductPrice() == null) ? 0 : getProductPrice().hashCode());
        result = prime * result + ((getTransferableNumber() == null) ? 0 : getTransferableNumber().hashCode());
        result = prime * result + ((getNotStockedNumber() == null) ? 0 : getNotStockedNumber().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getStorageNumber() == null) ? 0 : getStorageNumber().hashCode());
        result = prime * result + ((getProductRemark() == null) ? 0 : getProductRemark().hashCode());
        result = prime * result + ((getOrdersId() == null) ? 0 : getOrdersId().hashCode());
        result = prime * result + ((getDeleteStatus() == null) ? 0 : getDeleteStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getSelectedStatus() == null) ? 0 : getSelectedStatus().hashCode());
        result = prime * result + ((getWaitingStock() == null) ? 0 : getWaitingStock().hashCode());
        result = prime * result + ((getNotifiedCount() == null) ? 0 : getNotifiedCount().hashCode());
        result = prime * result + ((getUnnotifiedQuantity() == null) ? 0 : getUnnotifiedQuantity().hashCode());
        result = prime * result + ((getNotificationQuantity() == null) ? 0 : getNotificationQuantity().hashCode());
        result = prime * result + ((getDetailsStatus() == null) ? 0 : getDetailsStatus().hashCode());
        result = prime * result + ((getTheAmountRequestedQuash() == null) ? 0 : getTheAmountRequestedQuash().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", proNo=").append(proNo);
        sb.append(", productName=").append(productName);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", transferableNumber=").append(transferableNumber);
        sb.append(", notStockedNumber=").append(notStockedNumber);
        sb.append(", amount=").append(amount);
        sb.append(", storageNumber=").append(storageNumber);
        sb.append(", productRemark=").append(productRemark);
        sb.append(", ordersId=").append(ordersId);
        sb.append(", deleteStatus=").append(deleteStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", productId=").append(productId);
        sb.append(", selectedStatus=").append(selectedStatus);
        sb.append(", waitingStock=").append(waitingStock);
        sb.append(", notifiedCount=").append(notifiedCount);
        sb.append(", unnotifiedQuantity=").append(unnotifiedQuantity);
        sb.append(", notificationQuantity=").append(notificationQuantity);
        sb.append(", detailsStatus=").append(detailsStatus);
        sb.append(", theAmountRequestedQuash=").append(theAmountRequestedQuash);
        sb.append("]");
        return sb.toString();
    }
}
